MIN_IOS_VERSION = "10.0"

load(
    "@build_bazel_rules_apple//apple:ios.bzl",
    "ios_framework",
)

ios_framework(
    name = "HelloWorldApp",
    hdrs = [
        "MediapipeEdgeDetection.h",
    ],
    bundle_id = "com.google.mediapipe.HelloWorld",
    families = [
        "iphone",
        "ipad",
    ],
    infoplists = ["Info.plist"],
    minimum_os_version = MIN_IOS_VERSION,
    deps = [":HelloWorldAppLibrary"],
)

objc_library(
    name = "HelloWorldAppLibrary",
    srcs = [
        "MediapipeEdgeDetection.mm",
    ],
    hdrs = [
        "MediapipeEdgeDetection.h",
    ],
    data = [
        "//mediapipe/graphs/edge_detection:mobile_gpu_binary_graph",
    ],
    sdk_frameworks = [
        "UIKit",
        "AVFoundation",
    	"CoreGraphics",
    	"CoreMedia",
    ],
    deps = [
    	"//mediapipe/objc:mediapipe_framework_ios",
    	"//mediapipe/objc:mediapipe_input_sources_ios",
    	"//mediapipe/objc:mediapipe_layer_renderer",
        "//mediapipe/graphs/edge_detection:mobile_calculators",
    ],
)
